package com.corecloud.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.corecloud.entity.SysUserRoleEntity;
import com.corecloud.mapper.mysql.SysUserRoleMapper;
import com.corecloud.service.SysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("sysUserRoleService")
public class SysUserRoleServiceImpl implements SysUserRoleService {

    @Autowired
    private SysUserRoleMapper sysUserRoleMapper;

    @Override
    public SysUserRoleEntity getByParas(QueryWrapper<SysUserRoleEntity> qw) {
        return sysUserRoleMapper.selectOne(qw);
    }

    @Override
    public List<SysUserRoleEntity> getListByParas(QueryWrapper<SysUserRoleEntity> qw) {
        return sysUserRoleMapper.selectList(qw);
    }


    public void updateInfoByRid(Integer rid){
        sysUserRoleMapper.updateInfoByRid(rid);
    }

    @Override
    public void deleteByParas(QueryWrapper<SysUserRoleEntity> qw) {
        sysUserRoleMapper.delete(qw);
    }

    @Override
    public void insertInfo(SysUserRoleEntity info) {
        sysUserRoleMapper.insert(info);
    }

}